﻿@model vngoodlife.Comment
           

<div  id="commentshow">

    @if (Context.User.Identity.IsAuthenticated == false)
    {
        using (Html.BeginForm("GuestCommentCreate", "Comment", FormMethod.Post, new { id = "GuestCommentForm" }))
        {
            @Html.AntiForgeryToken(vngoodlife.Util.AntiKey.EditSalt)
            @Html.ValidationSummary(true)
            <div id="Guest_Comment">
                @Html.TextAreaFor(model => model.CommentContent, new { @class = "ckeditor" })
                @*@Html.ValidationMessageFor(model => model.CommentContent)*@
                <p id="mesCommentContent" class="alert_frontend"></p>
            
                <div id="Guest_Name">
                    <div><label>Họ tên: </label></div>
                    <div>@Html.TextBoxFor(model => model.GuestName, new { maxlength = "30"})</div>
                    <div><p id="mesGuestName" class="alert_frontend"></p></div>
                </div>
        
                <div id="Guest_Email">
                    <div><label>Email: </label></div>
                    <div>@Html.TextBoxFor(model => model.GuestEmail, new { maxlength = "100" })</div>
                    <div><p id="mesGuestEmail" class="alert_frontend"></p></div>
                </div>
   
                <p id="Comment_Submit"><input id="GuestCommentSubmit" type="submit" value="Bình luận" class="button" /></p>
                <input type="hidden" name="articleID" value="@ViewBag.CommentArticleID" />
            </div>
        }
    }
    else
    {
        using (Html.BeginForm("MemberCommentCreate", "Comment", FormMethod.Post, new { id = "MemberCommentForm" }))
        {
            @Html.AntiForgeryToken(vngoodlife.Util.AntiKey.EditSalt)
            @Html.ValidationSummary(true)
            <div id="Member_Comment">
                @Html.TextAreaFor(model => model.CommentContent, new { @class = "ckeditor" })
                <p id="mesCommentContent" class="alert_frontend"></p>
                <input id="button" type="submit" value="Bình luận" class="button"/>
                <input type="hidden" name="articleID" value="@ViewBag.CommentArticleID" />
            </div>
        }

    }

</div>







